package cn.jiyun.service;

import cn.jiyun.mapper.UserMapper;
import cn.jiyun.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    public List<User> findAll() {
        return userMapper.findAll();
    }

    public void add(User user) {
        userMapper.add(user);
    }

    public void del(Integer id) {
        userMapper.del(id);
    }

    @Override
    public void update(User user) {
        userMapper.update(user);
    }

    @Override
    public User findUpdate(Integer id) {
        return userMapper.findUpdate(id);
    }
    @Override
    public User login(User user) {
        return userMapper.login(user);
    }
}
